<template>
    <el-card shadow="always" :body-style="{ padding: '20px' }">
        <el-tabs v-model="currentTabs">
            <el-tab-pane label="需求列表" name="data">
                <demand-data></demand-data>
            </el-tab-pane>
            <el-tab-pane label="需求添加" name="add">
                <demand-add></demand-add>
            </el-tab-pane>
            <el-tab-pane label="需求信息修改" name="edit" v-if="showEdit">
                <demand-edit></demand-edit>
            </el-tab-pane>
        </el-tabs>
    </el-card>
    
</template>

<script>
import { mapState } from 'vuex'
import DemandAddVue from './DemandAdd.vue'
import DemandEditVue from './DemandEdit.vue'
import DemandTableVue from './DemandTable.vue'


export default {
    name: "Demand",
    data(){
        return {
            
        }
    },
    components: {
        'demand-data': DemandTableVue,
        'demand-add': DemandAddVue,
        'demand-edit': DemandEditVue
    },
    computed: {
        ...mapState('ad', [
            'currentTabs',
            'showEdit',
        ])
    }
}
</script>